package cn.hiapi.shopkeeper.entity.user;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author AdinZ
 * @date 2022/12/31 22:25
 */
@Entity
@Table(name = "hiapi_shopkeeper_subscribe")
@ApiModel(description = "订阅店铺")
@Getter
@Setter
public class SubscribeShop extends BasicEntity {

    @Id
    @GeneratedValue(generator = "snowflake")
    @GenericGenerator(name = "snowflake", strategy = "cn.hiapi.basic.id.SnowflakeId")
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;
    @ApiModelProperty("用户")
    private long uid;
    @ApiModelProperty("订阅的店铺")
    private long shopId;
    private long crated = System.currentTimeMillis();


}
